/* -*- mode: c++ -*- */
/**
 * @file   Transforms.ih
 * @author Sebastien Fourey (GREYC)
 * @date   Sat Aug 18 2007
 * 
 * @brief  Inline methods of the Transform classes.
 * \@copyright
 * This source code is part of the Board project, a C++ library whose
 * purpose is to allow simple drawings in EPS, FIG or SVG files.
 * Copyright (C) 2007 Sebastien Fourey <http://foureys.users.greyc.fr/>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#if defined( max )
#undef max 
#define _HAS_MSVC_MAX_ true
#endif


Transform::Transform() 
  : _scale(1.0), _deltaX(0.0), _deltaY(0.0), _height(0.0)
{ }
  
TransformFIG::TransformFIG()
 : _maxDepth(std::numeric_limits<int>::max()),_minDepth(0),_postscriptScale(1.0)
{ }

    
double Transform::round( const double & x )
{
  return std::floor( x + 0.5 );
}

#if defined( _HAS_MSVC_MAX_ )
#define max(A,B) ((A)>(B)?(A):(B))
#endif
